﻿using System;
using System.Windows.Data;
using System.Windows.Media;
using Microsoft.TeamFoundation.WorkItemTracking.Client;

namespace WIAssistant
{
    [ValueConversion(typeof(double), typeof(String))]
    public class IsTextPresentConverter : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter,System.Globalization.CultureInfo culture)
        {
            if (value == null)
                return "";

            String valAsString = value.ToString();

            return (valAsString != String.Empty);
            
        }
        public object ConvertBack(object value, Type targetType,object parameter,System.Globalization.CultureInfo culture)
        {
            throw new Exception("The method or operation is not implemented.");
        }

    }
}
